package sw6.admin.gui;

import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;

/**
 * This is a our own implementation of Dialog. This version has a field, yealding true if the
 * dialog has been restored at some point
 * @author sw6b
 *
 */
public class StateDialog extends Dialog {

	private boolean mRestored = false;
	
	public StateDialog(Context context) {
		super(context);
	}

	@Override
	public void onRestoreInstanceState(Bundle savedInstanceState) {
		mRestored = true;
	    super.onRestoreInstanceState(savedInstanceState);
	}
	
	public void onStart() {
		mRestored = false;
	}
	
	public boolean getRestored() {
		return mRestored;
	}
	
	public void setRestored(boolean value) {
		mRestored = value; 
	}
}
